﻿using System.Drawing;

namespace EmotionsExtract.UITex
{
    /// <summary>
    /// UITex 动画帧
    /// </summary>
    public class AnimationFrame : IFrame
    {
        /// <summary>
        /// 此动画帧指向的静态帧
        /// </summary>
        public Frame Parent { get; private set; }

        /// <summary>
        /// 此动画帧的延迟（毫秒）
        /// </summary>
        public int Delay { get; private set; }

        public Bitmap GetImage()
        {
            return this.Parent.GetImage();
        }

        public AnimationFrame(Frame parent, int delay)
        {
            this.Parent = parent;
            this.Delay = delay;
            this.Parent.UsedByAnimation = true;
        }
    }
}
